package com.example.demo.controler;

import com.example.demo.utils.lei;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/p")
public class control {
    @RequestMapping("/p1")
    public String toIndex(Model model) {
        model.addAttribute("message", "Hello,how are you doing?");
        return "index1";
    }

    @RequestMapping("/p2")
    public String toInde(Model model) {
        lei l = new lei();
        l.setA(90);
        l.setD("lllll");
        model.addAttribute("messag", l);
        return "index2";
    }

    @RequestMapping("/p3")
    public String toInd(Model model) {
        model.addAttribute("messa", "/p/p1");
        return "index3";
    }

    @RequestMapping("/p4")
    public String toIn(Model model) {
        model.addAttribute("mess", "/p/p1");
        lei l = new lei();
        l.setA(90);
        l.setD("lllll");
        model.addAttribute("a", 1);
        model.addAttribute("b", 2);
        return "index4";
    }
}
